package flst.ipiweb.process;

import java.util.List;

import flst.ipiweb.persistance.FactoryDAL;
import flst.ipiweb.transverse.Admin;
import flst.ipiweb.transverse.IPIWebException;

public class AdminProcess {

	public List<Admin> GetAllAdmin() throws IPIWebException{
		return FactoryDAL.getInstance().getAdminDAL().getAllAdmin();
		
	}
	
	public void CreateAdmin(Admin adm) throws IPIWebException{
		FactoryDAL.getInstance().getAdminDAL().CreateAdmin(adm);
	}
	
	public void UpdateAdmin(Admin adm) throws IPIWebException{
		FactoryDAL.getInstance().getAdminDAL().UpdateAdmin(adm);
	}
	
	public Admin GetAdminByLogin(String login) throws IPIWebException{
		return FactoryDAL.getInstance().getAdminDAL().GetAdminByLogin(login);
	}
	
	public Admin GetAdminById(int id) throws IPIWebException{
		return FactoryDAL.getInstance().getAdminDAL().GetAdminById(id);
	}
	
	public void deleteAdmin(int id) throws IPIWebException{
		FactoryDAL.getInstance().getAdminDAL().deleteAdmin(id);
	}
	
	public Boolean CheckLogin(String login) throws IPIWebException{
		return FactoryDAL.getInstance().getAdminDAL().CheckLogin(login);
	}
}
